Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify doc links to use paths relative to doc folder #24979

Merged
merged 5 commits into from
May 29, 2023

Conversation

HesterG
Copy link
Contributor

@HesterG HesterG commented May 29, 2023

Changes:

  1. Use uniform links types relative to doc folder (start with doc/)
  2. According to docusaurus links, if <a> is used, the href is resolved as URL location, but not file location. So need to use [text]({{< relref "path" >}}) instead.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 29, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 29, 2023
@HesterG HesterG added the type/docs This PR mainly updates/creates documentation label May 29, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 29, 2023
@lunny
Copy link
Member

lunny commented May 29, 2023

Could we have a check to prevent users to add newly wrong links in future PRs? This could also be another PR and will not block this one.

@silverwind
Copy link
Member

Could we have a check to prevent users to add newly wrong links in future PRs? This could also be another PR and will not block this one.

Doesn't either markdownlint or the docs build already do that?

@silverwind
Copy link
Member

BTW, there is a docasaurus eslint plugin, but it does not do link verification:

https://docusaurus.io/docs/api/misc/@docusaurus/eslint-plugin

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 29, 2023
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 29, 2023
@silverwind silverwind enabled auto-merge (squash) May 29, 2023 13:11
@silverwind silverwind merged commit 0018b0a into go-gitea:main May 29, 2023
@GiteaBot GiteaBot added this to the 1.20.0 milestone May 29, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 29, 2023
@HesterG
Copy link
Contributor Author

HesterG commented May 30, 2023

https://docusaurus.io/docs/api/misc/@docusaurus/eslint-plugin

Thanks, I will check this.

Could we have a check to prevent users to add newly wrong links in future PRs? This could also be another PR and will not block this one.

Doesn't either markdownlint or the docs build already do that?

Looks like markdownlint does not have link checks? And docs copied files but did not do checks?

@HesterG HesterG deleted the unify-doc-links branch May 30, 2023 00:47
@HesterG HesterG added the outdated/backport/v1.19 This PR should be backported to Gitea 1.19 label May 30, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 30, 2023
* upstream/main:
  Remove unnecessary content on docs (go-gitea#24976)
  Upgrade snap to node 20 (go-gitea#24990)
  Display file mode for new file and file mode changes (go-gitea#24966)
  Enable `vue/html-closing-bracket-spacing` eslint rule (go-gitea#24987)
  Fix repo level project - edit column  (go-gitea#24982)
  Add v3.18 to TestPackageAlpine (go-gitea#24972)
  Fix admin config page error, use tests to cover the admin config and 500 error page (go-gitea#24965)
  Improve dropdown menus, remove inline styles (go-gitea#24954)
  Unify doc links to use paths relative to doc folder (go-gitea#24979)
  Rework button coloring, add focus and active colors (go-gitea#24507)
  Add PDF rendering via PDFObject (go-gitea#24086)
  Hide 'Mirror Settings' when unneeded, improve hints (go-gitea#24433)
  Consolidate the two review boxes into one (go-gitea#24738)
  API endpoint for changing/creating/deleting multiple files (go-gitea#24887)
  Repo list improvements, fix bold helper classes (go-gitea#24935)
  Add step start time to `ViewStepLog` (go-gitea#24980)
  Update from-binary.en-us.md (go-gitea#24975)
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.19. @HesterG, please send one manually. 🍵

go run ./contrib/backport 24979
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label May 30, 2023
HesterG added a commit to HesterG/gitea that referenced this pull request May 30, 2023
Changes:

1. Use uniform links types relative to doc folder (start with `doc/`)
2. According to [docusaurus
links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is
used, the `href` is resolved as URL location, but not file location. So
need to use `[text]({{< relref "path" >}})` instead.
@lunny lunny added the backport/done All backports for this PR have been created label May 30, 2023
lunny pushed a commit that referenced this pull request May 30, 2023
Backport #24979 

Changes:

1. Use uniform links types relative to doc folder (start with `doc/`)
2. According to [docusaurus
links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is
used, the `href` is resolved as URL location, but not file location. So
need to use `[text]({{< relref "path" >}})` instead.
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this pull request Jun 7, 2023
…o-gitea#25000)

Backport go-gitea#24979

Changes:

1. Use uniform links types relative to doc folder (start with `doc/`)
2. According to [docusaurus
links](https://docusaurus.io/docs/markdown-features/links), if `<a>` is
used, the `href` is resolved as URL location, but not file location. So
need to use `[text]({{< relref "path" >}})` instead.

(cherry picked from commit d2c9fb0)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants